package org.example.manager;

import org.example.model.ShortLinkDO;

/**
 * @description: 短链相关manager层
 * @author: 谢超
 * @date: 2023/8/17 11:41
 */
public interface ShortLinkManager {

    /**
     * 新增短链
     * @param shortLinkDO
     * @return
     */
    int addShortLink(ShortLinkDO shortLinkDO);

    /**
     * 根据短链码查找短链
     * @param shortLinkCode
     * @return
     */
    ShortLinkDO getShortLinkByCode(String shortLinkCode);

    /**
     * 删除短链
     * @param shortLinkDO
     * @return
     */
    int deleteShortLink(ShortLinkDO shortLinkDO);

    /**
     * 更新短链
     * @param shortLinkDO
     * @return
     */
    int update(ShortLinkDO shortLinkDO);
}
